﻿@using ThuySan.Areas.Backend.Models
@model IEnumerable<dynamic>
@{
    Layout = "~/Areas/Backend/Views/Shared/_Layout.cshtml";
    Header header = new Header {
                                       Common = "ViewUserControl_Email_Index",
                                       PageHeader = "Quản lý Email Template",
                                       Menulv1 = "02",
                                       Menulv2 = "0204"
                               };
    ViewData[Header.Key] = header;
    ViewBag.Title = "Manage Email Template - Admin Control Panel";
}
@Html.Telerik().Grid(Model).Name("grid").Columns(c =>
                                                     {
                                                         c.Bound(typeof (int), "Id").Title("ID").Width(50);
                                                         c.Bound(typeof (string), "Name").Title("Tên");
                                                         c.Template(v => v.ProductId).ClientTemplate(Html.ActionLink("<span class=\"t-icon t-edit\"></span>", "Edit", new {
                                                                                                                                                                                  id = "<#=Id#>"
                                                                                                                                                                          }, new {
                                                                                                                                                                                         @class = "t-button t-button-icon t-grid-edit",
                                                                                                                                                                                 }).ToHtmlString()).Width(40);
                                                     }).Sortable(c => c.Enabled(true)).Filterable().DataKeys(c => c.Add("Id")).Pageable(c =>
                                                                                                                                            {
                                                                                                                                                c.Enabled(true);
                                                                                                                                                c.PageSize(25);
                                                                                                                                            }).DataBinding(c => c.Ajax().Select("GetList", "Email", new {
                                                                                                                                                                                                                ViewBag.Id
                                                                                                                                                                                                        }))